05. Windows Setup

Installing Git

To download Git:

  1. go to https://git-scm.com/downloads
  • download the software for Windows
  • install Git choosing all of the default options

Once everything is installed, you should be able to run git on the command line. If it displays the usage information, then you're good to go!

If you run into any issues, please remember to take advantage of Knowledge and the community in your Study Group.

Configuring the Command Prompt on Windows

We're about to configure the Command Prompt to display helpful information when in a directory that's under version control. This is an optional step! You do not need to re-configure your Command Prompt for Git to work. You can complete the entire course without reconfiguring it. However, reconfiguring the Command Prompt makes it significantly easier to use.

If you choose to configure your Command Prompt, here's what it should look like when you're finished.

_The Command Prompt application on Windows. The Command Prompt has been configured to display version control information._

The Command Prompt application on Windows. The Command Prompt has been configured to display version control information.

Nd016 WebND Ud123 Gitcourse BETAMOJITO L1 30 Configure Terminal

First Time Git Configuration

Before you can start using Git, you need to configure it. Run each of the following lines on the command line to make sure everything is set up.

# sets up Git with your name
git config --global user.name "<Your-Full-Name>"

# sets up Git with your email
git config --global user.email "<your-email-address>"

# makes sure that Git output is colored
git config --global color.ui auto

# displays the original state in a conflict
git config --global merge.conflictstyle diff3

git config --list

Git & Code Editor

The last step of configuration is to get Git working with your code editor. Below are three of the most popular code editors. If you use a different editor, then do a quick search on Google for "associate X text editor with Git" (replace the X with the name of your code editor).

Atom Editor Setup

git config --global core.editor "atom --wait"

Sublime Text Setup

git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe' -n -w"

VSCode Setup

git config --global core.editor "code --wait"

Everything Is All Set Up

Task List:

Task Feedback:

Fantastic work!